package expertise.titan.datasource;

import com.thinkaurelius.titan.core.TitanGraph;
import com.thinkaurelius.titan.core.TitanTransaction;
import com.thinkaurelius.titan.core.TransactionBuilder;

/**
 * This is the interface describing the Expertise {@link TitanDataSource} for
 * getting Titan transactions and the configured graph.
 * 
 * @author bdgould
 * 
 */
public interface TitanDataSource {

	/**
	 * 
	 * @return a new {@link TitanTransaction} object for performing Titan DAO
	 *         work
	 */
	TitanTransaction newTransaction();

	/**
	 * 
	 * @return a new {@link TransactionBuilder} to create a custom
	 *         {@link TitanTransaction}
	 */
	TransactionBuilder buildTransaction();

	/**
	 * 
	 * @return The {@link TitanGraph} this data source is configured to connect
	 *         to
	 */
	TitanGraph graph();

}
